﻿Public Class PServicios_BE
    Private _Proceso As String
    Property Proceso() As String
        Get
            Return Me._Proceso
        End Get
        Set(ByVal value As String)
            Me._Proceso = value
        End Set
    End Property
    Private _Categoria As String
    Property Categoria() As String
        Get
            Return Me._Categoria
        End Get
        Set(ByVal value As String)
            Me._Categoria = value
        End Set
    End Property
    Private _SubCategoria As String
    Property SubCategoria() As String
        Get
            Return Me._SubCategoria
        End Get
        Set(ByVal value As String)
            Me._SubCategoria = value
        End Set
    End Property
    Private _ID_POS_Servicio_Sin As String
    Property ID_POS_Servicio_Sin() As String
        Get
            Return Me._ID_POS_Servicio_Sin
        End Get
        Set(ByVal value As String)
            Me._ID_POS_Servicio_Sin = value
        End Set
    End Property
    Private _RUC As String
    Property RUC() As String
        Get
            Return Me._RUC
        End Get
        Set(ByVal value As String)
            Me._RUC = value
        End Set
    End Property
    Private _RSocial As String
    Property RSocial() As String
        Get
            Return Me._RSocial
        End Get
        Set(ByVal value As String)
            Me._RSocial = value
        End Set
    End Property
    Private _Comercio As String
    Property Comercio() As String
        Get
            Return Me._Comercio
        End Get
        Set(ByVal value As String)
            Me._Comercio = value
        End Set
    End Property
    Private _NumID As String
    Property NumID() As String
        Get
            Return Me._NumID
        End Get
        Set(ByVal value As String)
            Me._NumID = value
        End Set
    End Property
    Private _N_Comercial As String
    Property N_Comercial() As String
        Get
            Return Me._N_Comercial
        End Get
        Set(ByVal value As String)
            Me._N_Comercial = value
        End Set
    End Property
    Private _XC As String
    Property XC() As String
        Get
            Return Me._XC
        End Get
        Set(ByVal value As String)
            Me._XC = value
        End Set
    End Property
    Private _Direccion As String
    Property Direccion() As String
        Get
            Return Me._Direccion
        End Get
        Set(ByVal value As String)
            Me._Direccion = value
        End Set
    End Property
    Private _UbiGeo As String
    Property UbiGeo() As String
        Get
            Return Me._UbiGeo
        End Get
        Set(ByVal value As String)
            Me._UbiGeo = value
        End Set
    End Property
    Private _ID_UbiGeo As String
    Property ID_UbiGeo() As String
        Get
            Return Me._ID_UbiGeo
        End Get
        Set(ByVal value As String)
            Me._ID_UbiGeo = value
        End Set
    End Property
    Private _ID_Localidad As String
    Property ID_Localidad() As String
        Get
            Return Me._ID_Localidad
        End Get
        Set(ByVal value As String)
            Me._ID_Localidad = value
        End Set
    End Property
    Private _Moneda As String
    Property Moneda() As String
        Get
            Return Me._Moneda
        End Get
        Set(ByVal value As String)
            Me._Moneda = value
        End Set
    End Property
    Private _ID_Estado_Com As String
    Property ID_Estado_Com() As String
        Get
            Return Me._ID_Estado_Com
        End Get
        Set(ByVal value As String)
            Me._ID_Estado_Com = value
        End Set
    End Property
    Private _OSVContacto As String
    Property OSVContacto() As String
        Get
            Return Me._OSVContacto
        End Get
        Set(ByVal value As String)
            Me._OSVContacto = value
        End Set
    End Property
    Private _OSVCargo As String
    Property OSVCargo() As String
        Get
            Return Me._OSVCargo
        End Get
        Set(ByVal value As String)
            Me._OSVCargo = value
        End Set
    End Property
    Private _OSVTelefono As String
    Property OSVTelefono() As String
        Get
            Return Me._OSVTelefono
        End Get
        Set(ByVal value As String)
            Me._OSVTelefono = value
        End Set
    End Property
    Private _OSVFecha As String
    Property OSVFecha() As String
        Get
            Return Me._OSVFecha
        End Get
        Set(ByVal value As String)
            Me._OSVFecha = value
        End Set
    End Property
    Private _OSVHora As String
    Property OSVHora() As String
        Get
            Return Me._OSVHora
        End Get
        Set(ByVal value As String)
            Me._OSVHora = value
        End Set
    End Property
    Private _OSVComentario As String
    Property OSVComentario() As String
        Get
            Return Me._OSVComentario
        End Get
        Set(ByVal value As String)
            Me._OSVComentario = value
        End Set
    End Property
    Private _CAPContacto As String
    Property CAPContacto() As String
        Get
            Return Me._CAPContacto
        End Get
        Set(ByVal value As String)
            Me._CAPContacto = value
        End Set
    End Property
    Private _CAPCargo As String
    Property CAPCargo() As String
        Get
            Return Me._CAPCargo
        End Get
        Set(ByVal value As String)
            Me._CAPCargo = value
        End Set
    End Property
    Private _CAPTelefono As String
    Property CAPTelefono() As String
        Get
            Return Me._CAPTelefono
        End Get
        Set(ByVal value As String)
            Me._CAPTelefono = value
        End Set
    End Property
    Private _CAPFecha As String
    Property CAPFecha() As String
        Get
            Return Me._CAPFecha
        End Get
        Set(ByVal value As String)
            Me._CAPFecha = value
        End Set
    End Property
    Private _CAPHora As String
    Property CAPHora() As String
        Get
            Return Me._CAPHora
        End Get
        Set(ByVal value As String)
            Me._CAPHora = value
        End Set
    End Property
    Private _CAPComentario As String
    Property CAPComentario() As String
        Get
            Return Me._CAPComentario
        End Get
        Set(ByVal value As String)
            Me._CAPComentario = value
        End Set
    End Property
    Private _Orden As String
    Property Orden() As String
        Get
            Return Me._Orden
        End Get
        Set(ByVal value As String)
            Me._Orden = value
        End Set
    End Property
    Private _OSV As String
    Property OSV() As String
        Get
            Return Me._OSV
        End Get
        Set(ByVal value As String)
            Me._OSV = value
        End Set
    End Property
    Private _CAP As String
    Property CAP() As String
        Get
            Return Me._CAP
        End Get
        Set(ByVal value As String)
            Me._CAP = value
        End Set
    End Property
    Private _Nro As String
    Property Nro() As String
        Get
            Return Me._Nro
        End Get
        Set(ByVal value As String)
            Me._Nro = value
        End Set
    End Property
    Private _Serie_Vir As String
    Property Serie_Vir() As String
        Get
            Return Me._Serie_Vir
        End Get
        Set(ByVal value As String)
            Me._Serie_Vir = value
        End Set
    End Property
    Private _Equipo As String
    Property Equipo() As String
        Get
            Return Me._Equipo
        End Get
        Set(ByVal value As String)
            Me._Equipo = value
        End Set
    End Property
    Private _Equipo_Term As String
    Property Equipo_Term() As String
        Get
            Return Me._Equipo_Term
        End Get
        Set(ByVal value As String)
            Me._Equipo_Term = value
        End Set
    End Property
    Private _Tipo As String
    Property Tipo() As String
        Get
            Return Me._Tipo
        End Get
        Set(ByVal value As String)
            Me._Tipo = value
        End Set
    End Property
    Private _Protocolo As String
    Property Protocolo() As String
        Get
            Return Me._Protocolo
        End Get
        Set(ByVal value As String)
            Me._Protocolo = value
        End Set
    End Property
    Private _XT As String
    Property XT() As String
        Get
            Return Me._XT
        End Get
        Set(ByVal value As String)
            Me._XT = value
        End Set
    End Property
    Private _Fec_Alta As String
    Property Fec_Alta() As String
        Get
            Return Me._Fec_Alta
        End Get
        Set(ByVal value As String)
            Me._Fec_Alta = value
        End Set
    End Property
    Private _Serie_Fis As String
    Property Serie_Fis() As String
        Get
            Return Me._Serie_Fis
        End Get
        Set(ByVal value As String)
            Me._Serie_Fis = value
        End Set
    End Property
    Private _Conexion As String
    Property Conexion() As String
        Get
            Return Me._Conexion
        End Get
        Set(ByVal value As String)
            Me._Conexion = value
        End Set
    End Property
    Private _Concentrador As String
    Property Concentrador() As String
        Get
            Return Me._Concentrador
        End Get
        Set(ByVal value As String)
            Me._Concentrador = value
        End Set
    End Property
    Private _Transaccion As String
    Property Transaccion() As String
        Get
            Return Me._Transaccion
        End Get
        Set(ByVal value As String)
            Me._Transaccion = value
        End Set
    End Property
    Private _Comunicacion As String
    Property Comunicacion() As String
        Get
            Return Me._Comunicacion
        End Get
        Set(ByVal value As String)
            Me._Comunicacion = value
        End Set
    End Property
    Private _ID_Terminal As String
    Property ID_Terminal() As String
        Get
            Return Me._ID_Terminal
        End Get
        Set(ByVal value As String)
            Me._ID_Terminal = value
        End Set
    End Property
    Private _ID_Equipo As String
    Property ID_Equipo() As String
        Get
            Return Me._ID_Equipo
        End Get
        Set(ByVal value As String)
            Me._ID_Equipo = value
        End Set
    End Property
    Private _ID_Marca As String
    Property ID_Marca() As String
        Get
            Return Me._ID_Marca
        End Get
        Set(ByVal value As String)
            Me._ID_Marca = value
        End Set
    End Property
    Private _ID_Modelo As String
    Property ID_Modelo() As String
        Get
            Return Me._ID_Modelo
        End Get
        Set(ByVal value As String)
            Me._ID_Modelo = value
        End Set
    End Property
    Private _ID_Protocolo As String
    Property ID_Protocolo() As String
        Get
            Return Me._ID_Protocolo
        End Get
        Set(ByVal value As String)
            Me._ID_Protocolo = value
        End Set
    End Property
    Private _ID_Conexion As String
    Property ID_Conexion() As String
        Get
            Return Me._ID_Conexion
        End Get
        Set(ByVal value As String)
            Me._ID_Conexion = value
        End Set
    End Property
    Private _ID_Concentrador As String
    Property ID_Concentrador() As String
        Get
            Return Me._ID_Concentrador
        End Get
        Set(ByVal value As String)
            Me._ID_Concentrador = value
        End Set
    End Property
    Private _ID_Transaccion As String
    Property ID_Transaccion() As String
        Get
            Return Me._ID_Transaccion
        End Get
        Set(ByVal value As String)
            Me._ID_Transaccion = value
        End Set
    End Property
    Private _ID_Comunicacion As String
    Property ID_Comunicacion() As String
        Get
            Return Me._ID_Comunicacion
        End Get
        Set(ByVal value As String)
            Me._ID_Comunicacion = value
        End Set
    End Property
    Private _ID_ISO As String
    Property ID_ISO() As String
        Get
            Return Me._ID_ISO
        End Get
        Set(ByVal value As String)
            Me._ID_ISO = value
        End Set
    End Property
    Private _ID_DTF As String
    Property ID_DTF() As String
        Get
            Return Me._ID_DTF
        End Get
        Set(ByVal value As String)
            Me._ID_DTF = value
        End Set
    End Property
    Private _ID_VI2 As String
    Property ID_VI2() As String
        Get
            Return Me._ID_VI2
        End Get
        Set(ByVal value As String)
            Me._ID_VI2 = value
        End Set
    End Property
    Private _ID_AMEX As String
    Property ID_AMEX() As String
        Get
            Return Me._ID_AMEX
        End Get
        Set(ByVal value As String)
            Me._ID_AMEX = value
        End Set
    End Property
    Private _ID_Estado_Term As String
    Property ID_Estado_Term() As String
        Get
            Return Me._ID_Estado_Term
        End Get
        Set(ByVal value As String)
            Me._ID_Estado_Term = value
        End Set
    End Property
    Private _ID_POS_Servicio As String
    Property ID_POS_Servicio() As String
        Get
            Return Me._ID_POS_Servicio
        End Get
        Set(ByVal value As String)
            Me._ID_POS_Servicio = value
        End Set
    End Property
    Private _POS_Servicio As String
    Property POS_Servicio() As String
        Get
            Return Me._POS_Servicio
        End Get
        Set(ByVal value As String)
            Me._POS_Servicio = value
        End Set
    End Property
    Private _XP As String
    Property XP() As String
        Get
            Return Me._XP
        End Get
        Set(ByVal value As String)
            Me._XP = value
        End Set
    End Property
    Private _ID_Estado_POS_Servicio As String
    Property ID_Estado_POS_Servicio() As String
        Get
            Return Me._ID_Estado_POS_Servicio
        End Get
        Set(ByVal value As String)
            Me._ID_Estado_POS_Servicio = value
        End Set
    End Property
    Private _ID_Proceso As String
    Property ID_Proceso() As String
        Get
            Return Me._ID_Proceso
        End Get
        Set(ByVal value As String)
            Me._ID_Proceso = value
        End Set
    End Property
End Class


Public Class ComercioComparer
    Implements IEqualityComparer(Of PServicios_BE)

    Public Function Equals1(ByVal x As PServicios_BE, ByVal y As PServicios_BE) As Boolean _
        Implements IEqualityComparer(Of PServicios_BE).Equals

        If x Is y Then Return True

        If x Is Nothing OrElse y Is Nothing Then Return False

        Return (x.Comercio = y.Comercio) AndAlso (x.ID_Protocolo = y.ID_Protocolo)
    End Function

    Public Function GetHashCode1(ByVal x As PServicios_BE) As Integer _
        Implements IEqualityComparer(Of PServicios_BE).GetHashCode

        If x Is Nothing Then Return 0

        Dim hashCodComercio = x.Comercio.GetHashCode()

        Dim hashProtocolo = x.ID_Protocolo.GetHashCode()

        Return hashCodComercio Xor hashProtocolo
    End Function
End Class


